import request from '@/utils/request'

// // 根据code获取信息
export function getTaskInfoByCode(code) {
  return request({
    url: '/basic/erpProduct/getByProductNo/'+code,
    method: 'get',
  })
}



// // 根据ID获取信息
export function getTaskInfoById(data) {
  return request({
    url: '/bill/modulationInBill/'+data,
    method: 'get',
  })
}


// 查询入库调整单列表
export function getAdjustBillList(query) {
  return request({
    url: '/bill/modulationInBill/list',
    method: 'get',
    params: query
  })
}
// 查询入库调整单明细列表
export function getBillReceiveDetailList(query) {
  return request({
    url: '/bill/modulationInBillDetail/list',
    method: 'get',
    params: query
  })
}

// 查询入库调整记录列表
export function getBillProductList(query) {
  return request({
    url: '/bill/billDetailRecord/list',
    method: 'get',
    params: query
  })
}
// 新增收货单明细
export function addReceiveDetail(data) {
  return request({
    url: '/bill/modulationInBill/addDetail',
    method: 'post',
    data
  })
}
// 完成收货单
export function complete(data) {
  return request({
    url: '/bill/modulationInBill/complete',
    method: 'post',
    data
  })
}

// // 根据ID删除任务明细
export function delByDetailId(id) {
  return request({
    url: '/bill/modulationInBill/' + id,
    method: 'delete',
  })
}
// //删除任务明细
export function delByReceiveDetail(data) {
  return request({
    url: '/bill/modulationInBill/deleteDetail',
    method: 'post',
    data
  })
}

// 新增条码记录
export function saveBarcode(data) {
  return request({
    url: '/storehouse/barcode',
    method: 'post',
    data
  })
}
